﻿<phone:PhoneApplicationPage 
    x:Class="MayhemWinPhone.SettingsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
	
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True"
    Loaded="PhoneApplicationPage_Loaded"
    >

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--Pivot Control-->
        <controls:Pivot Title="Mayhem" SelectedIndex="0">
            <!--Pivot item one-->
            <controls:PivotItem Header="Automatic">
                <Grid>
                    <Button Content="Scan with camera" Height="122" Margin="87,6,96,0" Name="button1" VerticalAlignment="Top" Click="button1_Click" />
                    <Image Height="392" HorizontalAlignment="Left" Margin="0,202,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="446" />
					<TextBlock Name="textBlockError" Style="{StaticResource PhoneTextNormalStyle}" HorizontalAlignment="Center" Margin="73,152,71,0" Text="Open the configuration for the Phone Module in Mayhem and point the camera at the QR code." VerticalAlignment="Top" Width="311" TextAlignment="Center" TextWrapping="Wrap" />
                </Grid>
            </controls:PivotItem>

            <!--Pivot item two-->
            <controls:PivotItem Header="Manual">
                <Grid>
                    <TextBlock Height="30" HorizontalAlignment="Left" Margin="10,37,0,0" Name="textBlock1" Text="IP Address:" VerticalAlignment="Top" FontSize="24" />
                    <TextBlock Height="30" HorizontalAlignment="Left" Margin="12,135,0,0" Name="textBlock2" Text="Port:" VerticalAlignment="Top" FontSize="24" />
                    <TextBox Height="72" HorizontalAlignment="Left" Margin="146,15,0,0" Name="textBoxIP" Text="" VerticalAlignment="Top" Width="273" KeyDown="textBox_KeyDown" TextChanged="textBoxIP_TextChanged">
                        <TextBox.InputScope>
                            <InputScope>
                                <!-- Review: May want to add alphabetic keyboard -->
                                <InputScopeName NameValue="Digits" />
                            </InputScope>
                        </TextBox.InputScope>
                    </TextBox>
                    <TextBox Height="72" HorizontalAlignment="Right" Margin="0,114,195,0" Name="textBoxPort" Text="" VerticalAlignment="Top" Width="115" KeyDown="textBox_KeyDown" TextChanged="textBoxPort_TextChanged">
                        <TextBox.InputScope>
                            <InputScope>
                                <InputScopeName NameValue="Digits" />
                            </InputScope>
                        </TextBox.InputScope>
                    </TextBox>
                    <TextBlock Height="30" HorizontalAlignment="Left" Margin="160,84,0,0" Name="textBlockErrorIP" Text="Error in IP Address" VerticalAlignment="Top" Width="246" Foreground="Red" Opacity="0" />
                    <TextBlock Height="30" HorizontalAlignment="Left" Margin="158,189,0,0" Name="textBlockErrorPort" Text="Error in Port" VerticalAlignment="Top" Width="255" Foreground="Red" Opacity="0" />
                </Grid>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton x:Name="appbar_button2" IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="menuItem1" Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem x:Name="menuItem2" Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->
    
</phone:PhoneApplicationPage>